<template>
  <div>
    <el-button type="success" plain @click="changeTitle">{{ title }}</el-button>




  </div>


</template>

<script>

export default {
  name: "Header",

  data() {
    return {
      title: "Vue.js Demo"
    }
  },


  methods: {


    changeTitle() {
      this.$emit("titleChanged", "子向父组件传值");//自定义事件  传递值"子向父组件传值"
    }
  },


}
</script>

<style scoped>

</style>
